﻿using Bilibili.Model.Bangumi;
using ReactiveUI;
using System.Collections.ObjectModel;

namespace Avalonia.BiliBili.ViewModels
{
    public sealed class ComicTypeViewModel : ViewModelBase
    {
        public int Type { get; set; }
        private bool isBangmi;
        public bool IsBangmi
        {
            get => isBangmi;
            set => this.RaiseAndSetIfChanged(ref isBangmi, value);
        }
        private ObservableCollection<BangmiHome> serializing = [];
        public ObservableCollection<BangmiHome> Serializing
        {
            get => serializing;
            private set => this.RaiseAndSetIfChanged(ref serializing, value);
        }
        private ObservableCollection<BangmiHome> previous = [];
        public ObservableCollection<BangmiHome> Previous
        {
            get => previous;
            private set => this.RaiseAndSetIfChanged(ref previous, value);
        }
        private ObservableCollection<BangmiHome> endRecommand = [];
        public ObservableCollection<BangmiHome> EndRecommand
        {
            get => endRecommand;
            private set => this.RaiseAndSetIfChanged(ref endRecommand, value);
        }
        private ObservableCollection<BanTJModelItem> recommand = [];
        public ObservableCollection<BanTJModelItem> Recommand
        {
            get => recommand;
            private set => this.RaiseAndSetIfChanged(ref recommand, value);
        }
        public override void Dispose()
        {
            base.Dispose();
            previous?.Clear();
            serializing?.Clear();
            recommand?.Clear();
            endRecommand?.Clear();
        }
    }
}